﻿<Window
  x:Name="This"
  x:Class="ImmlPad.MainWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:a="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
  xmlns:c="clr-namespace:ImmlPad.Controls"
  xmlns:v="clr-namespace:ImmlPad.Views"
  xmlns:k="clr-namespace:ImmlPad"
  WindowState="Maximized"
  MinHeight="300"
  MinWidth="600"
  SnapsToDevicePixels="True"
  FontSize="7.75pt"
  Foreground="#DDD"
  FontFamily="Verdana"
  AllowDrop="True"
  Closing="This_Closing">
  <Window.Title>
    <Binding ElementName="DocumentsView" Path="SelectedDocument.Filename" ConverterParameter=" - ImmlPad">
      <Binding.Converter>
        <c:AppendTextConverter />
      </Binding.Converter>
    </Binding>
  </Window.Title>
  
  <Window.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Resources/Brushes.xaml" />
      </ResourceDictionary.MergedDictionaries>
      <c:AddConverter x:Key="AddConverter" />
    </ResourceDictionary>
  </Window.Resources>

  <Grid Background="#101010">

    <Grid.ColumnDefinitions>
      <ColumnDefinition x:Name="PluginsColumn" Width="Auto" />
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>

    <Grid Margin="0,5,0,5">

      <Border BorderBrush="#484848" BorderThickness="0,0,1,0" CornerRadius="0,4,4,0" >
        <Border.Background>
          <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <GradientStop Offset="0.0" Color="#484848" />
            <GradientStop Offset="1.0" Color="#282828" />
          </LinearGradientBrush>
        </Border.Background>
      </Border>

      <Border BorderBrush="#777" BorderThickness="0,1,0,0" CornerRadius="0,4,0,0" VerticalAlignment="Top" Height="25">
        <Border.Background>
          <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <GradientStop Offset="0.0" Color="#505050" />
            <GradientStop Offset="1.0" Color="#282828" />
          </LinearGradientBrush>
        </Border.Background>
      </Border>

      <Border BorderBrush="#777" BorderThickness="0,1,0,0" CornerRadius="0,4,4,0" />
      <Border BorderBrush="#404040" BorderThickness="0,0,0,1" CornerRadius="0,4,4,0" />
      

    </Grid>

    <!-- 
    *******************************************************************
    Main Menu
    ********************************************************************
    -->

    <v:MenuView Grid.Column="0" VerticalAlignment="Top" Height="24" Margin="0,6,1,0"/>

    <!-- 
    *******************************************************************
    PluginView
    ********************************************************************
    -->

    <v:PluginView x:Name="PluginView" Grid.Column="0" Margin="0,29,0,38"  />


        <!--<Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="35"/>
            </Grid.RowDefinitions>-->            

            <v:DocumentsView Grid.Column="1" x:Name="DocumentsView" XmlDocuments="{Binding ElementName=This, Path=XmlDocuments}" Margin="5" NewDocumentRequested="DocumentsView_NewDocumentRequested" CloseDocumentRequested="DocumentsView_CloseDocumentRequested" />

            <!--<Border Grid.Row="1" CornerRadius="0,0,4,0" Height="33" BorderBrush="#40FFFFFF" BorderThickness="0,1,0,0">
                <Border.Background>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="#10FFFFFF" Offset="0" />
                        <GradientStop Color="#00FFFFFF" Offset="1" />
                    </LinearGradientBrush>
                </Border.Background>

                <v:StatusView x:Name="StatusView"
                  Grid.Row="1" VerticalAlignment="Bottom"
                  Scale="{Binding ElementName=DocumentsView, Path=SelectedView.Scale, Mode=TwoWay}"
                  CurrentLineNumber="{Binding ElementName=DocumentsView, Path=SelectedView.TextEditor.LineNumber, Converter={StaticResource AddConverter}, ConverterParameter=1}" 
                  CurrentLinePosition="{Binding ElementName=DocumentsView, Path=SelectedView.TextEditor.LinePosition, Converter={StaticResource AddConverter}, ConverterParameter=1}" />
            </Border>
        </Grid>-->
    </Grid>
</Window>
